/**
 * 前端路由列表
 * @type Array.<Route>
 * @author rxliuli
 */
const routes = (() => {
    /**
     * 路由类定义
     */
    class Route {
        /**
         * 构造函数
         * @param name 路由的名字
         * @param link 对应的链接,如果为空则认为是文件夹
         * @param sort 顺序,只在同一文件夹下有效
         * @param show 是否显示, 1 显示 2 隐藏
         * @param permission 所需要的权限
         */
        constructor({
                        name,
                        link,
                        sort,
                        show,
                        permission,
                    }) {
            this.name = name
            this.link = link
            this.sort = sort
            this.show = show
            this.permission = permission
        }

        /**
         * 创建一个路由对象
         * @param {String} name 路由的名字
         * @param {String} permission 所需要的权限
         * @param {String} [link=null] 对应的链接,如果为空则认为是文件夹
         * @param {Number} [sort=1] 顺序,只在同一文件夹下有效. 默认为 1
         */
        static create(name,
                      permission,
                      link,
                      sort) {
            return new Route({
                name,
                link,
                sort,
                permission,
            })
        }
    }

    return [
        Route.create('基础数据'),
        Route.create('经营单位', '/basic-data/admin_idc_info'),
        Route.create('机房管理', '/basic-data/admin_house_info'),
        Route.create('机架管理', '/basic-data/admin_frame_info'),
        Route.create('服务器', '/basic-data/admin_servers'),
        Route.create('IP地址', '/basic-data/admin_ip_seg_info'),
        Route.create('客户管理', '/basic-data/admin_user_info'),
        Route.create('监控设备', '/basic-data/admin_monitor_device'),
        Route.create('负责人', '/basic-data/admin_officer'),
        Route.create('监管指令'),
        Route.create('管控指令', '/command-manage/admin_commandmanage'),
        Route.create('日志查询', '/command-manage/admin_commandlog'),
        Route.create('指令文件', '/command-manage/admin_commandfile'),
        Route.create('监测指令', '/command-manage/admin_commandmonitor'),
        Route.create('过滤指令', '/command-manage/admin_commandfilter'),
        Route.create('工单指令', '/command-manage/admin_filenotify'),
        Route.create('监管日志'),
        Route.create('异常IP', '/monitor-log/admin_monitor_ip'),
        Route.create('违规网站', '/monitor-log/admin_monitor_web'),
        Route.create('活跃域名', '/monitor-log/admin_active_domain'),
        Route.create('活跃IP', '/monitor-log/admin_active_ip'),
        Route.create('活跃URL', '/monitor-log/admin_active_url'),
        Route.create('访问日志', '/monitor-log/admin_visit_log'),
        Route.create('监测日志', '/monitor-log/admin_monitor_log'),
        Route.create('过滤日志', '/monitor-log/admin_filter_log'),
        Route.create('非法监控'),
        Route.create('备案监管', '/illegal-monitor/admin_web_icp'),
        Route.create('非法信息', '/illegal-monitor/admin_illegal'),
        Route.create('非法多媒体', '/illegal-monitor/admin_multimedia'),
        Route.create('入侵监测', '/illegal-monitor/admin_netvirus'),
        Route.create('入侵防御', '/illegal-monitor/admin_netdefend'),
        Route.create('VPN监测', '/illegal-monitor/admin_vpnmonitor'),
        Route.create('报表统计'),
        Route.create('备案统计', '/report-statistics/admin_plot_filing'),
        Route.create('非法信息', '/report-statistics/admin_plot_illegal'),
        Route.create('非法多媒体', '/report-statistics/admin_plot_multimedia'),
        Route.create('屏蔽统计', '/report-statistics/admin_plot_whitelist'),
        Route.create('域名流量', '/report-statistics/admin_plot_block_domain'),
        Route.create('安全日志', '/report-statistics/admin_plot_securitylog'),
        Route.create('操作日志', '/report-statistics/admin_plot_auditlog'),
        Route.create('系统配置'),
        Route.create('系统设置', '/system-config/admin_sysconfig'),
        Route.create('基础代码', '/system-config/admin_sysfield'),
        Route.create('关键词库', '/system-config/admin_keywords'),
        Route.create('域名类型', '/system-config/admin_domainsuffix'),
        Route.create('黑白名单', '/system-config/admin_whitelist'),
        Route.create('备份还原', '/system-config/admin_meta_base'),
        Route.create('账户管理', '/system-config/admin_privilege'),
        Route.create('事务日志'),
        Route.create('事务日志', '/security-log/admin_security'),
        Route.create('活动日志', '/security-log/admin_security_loginsessionlist'),
        Route.create('安全日志', '/security-log/admin_security_securityloglist'),
        Route.create('操作日志', '/security-log/admin_security_auditloglist'),
        Route.create('系统日志', '/security-log/admin_security_sysloglist'),
        Route.create('告警日志', '/security-log/admin_alarm_log'),
        Route.create('网络配置'),
        Route.create('通讯管理', '/network-config/admin_api_submit'),
        Route.create('网络管理', '/network-config/admin_interface'),
        Route.create('VPN管理', '/network-config/admin_vpn'),
        Route.create('在线升级', '/network-config/admin_update'),
        Route.create('有问必答', '/network-config/admin_support'),
    ]
})()

